import React, { useState } from 'react';
import { Input,Button } from "antd";
function Search({kkk}) {
    const [keyword,setKeyword]=useState('')
    const sou=()=>{
        kkk({keyword})
    }
    const kong=()=>{
        kkk({keyword:''})
        setKeyword('')
    }
    return (
        <div>
            <Input style={{maxWidth:'200px'}} placeholder="请输入关键字" value={keyword} onChange={(e)=>setKeyword(e.target.value)} />
            <Button onClick={sou} type='primary'>搜索</Button>
            <Button onClick={kong}>清空</Button>
        </div>
    );
}

export default Search;